package light.im.logicserver.action;

import org.json.JSONException;
import org.json.JSONObject;

import light.im.IAction;
import light.im.IMSession;
import light.network.object.PackObject;

public class CreateChatAction implements IAction{

	@Override
	public void execute(IMSession session, PackObject req) {
		try
		{
			JSONObject h = req.getHeader();
			req.getString("session");
			String target = h.getString("target");
			System.out.println("chat to "+target);
			
			PackObject rz = new PackObject();
			rz.getHeader().put("ip", "localhost").put("port", 12345);
		}
		catch(JSONException e)
		{
			e.printStackTrace();
		}
	}

//	@Override
//	public void fail(IMSession session, Throwable ext) {
//		ext.printStackTrace();
//	}

}
